<?xml version="1.0"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
  <start>
    <choice>
      <choice>
        <choice>
          <element>
            <name ns="http://eric.van-der-vlist.com/ns/library">library</name>
            <oneOrMore>
              <ref name="book-element-id2613963"/>
            </oneOrMore>
          </element>
          <ref name="book-element-id2613963"/>
        </choice>
        <ref name="author-element-id2614058"/>
      </choice>
      <ref name="character-element-id2613924"/>
    </choice>
  </start>
  <define name="foreign-elements-id2614183">
    <choice>
      <oneOrMore>
        <element>
          <anyName>
            <except>
              <choice>
                <choice>
                  <nsName ns=""/>
                  <nsName ns="http://eric.van-der-vlist.com/ns/library"/>
                </choice>
                <nsName ns="http://eric.van-der-vlist.com/ns/person"/>
              </choice>
            </except>
          </anyName>
          <ref name="anything-id2614112"/>
        </element>
      </oneOrMore>
      <empty/>
    </choice>
  </define>
  <define name="foreign-attributes-id2614152">
    <choice>
      <oneOrMore>
        <attribute>
          <anyName>
            <except>
              <choice>
                <choice>
                  <nsName ns=""/>
                  <nsName ns="http://eric.van-der-vlist.com/ns/library"/>
                </choice>
                <nsName ns="http://eric.van-der-vlist.com/ns/person"/>
              </choice>
            </except>
          </anyName>
          <text/>
        </attribute>
      </oneOrMore>
      <empty/>
    </choice>
  </define>
  <define name="anything-id2614112">
    <choice>
      <oneOrMore>
        <choice>
          <choice>
            <element>
              <anyName/>
              <ref name="anything-id2614112"/>
            </element>
            <attribute>
              <anyName/>
              <text/>
            </attribute>
          </choice>
          <text/>
        </choice>
      </oneOrMore>
      <empty/>
    </choice>
  </define>
  <define name="foreign-nodes-id2614043">
    <choice>
      <oneOrMore>
        <choice>
          <ref name="foreign-attributes-id2614152"/>
          <ref name="foreign-elements-id2614183"/>
        </choice>
      </oneOrMore>
      <empty/>
    </choice>
  </define>
  <define name="author-element-id2614058">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/person">author</name>
      <group>
        <group>
          <group>
            <attribute>
              <name ns="">id</name>
              <data datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" type="NMTOKEN">
                <param name="maxLength"> 16 </param>
              </data>
            </attribute>
            <ref name="name-element-id2613832"/>
          </group>
          <ref name="born-element-id2613943"/>
        </group>
        <choice>
          <ref name="dead-element-id2613856"/>
          <empty/>
        </choice>
      </group>
    </element>
  </define>
  <define name="book-content-id2614016">
    <interleave>
      <group>
        <group>
          <group>
            <group>
              <group>
                <attribute>
                  <name ns="">id</name>
                  <text/>
                </attribute>
                <attribute>
                  <name ns="">available</name>
                  <ref name="available-content-id2613805"/>
                </attribute>
              </group>
              <ref name="isbn-element-id2613872"/>
            </group>
            <ref name="title-element-id2613819"/>
          </group>
          <choice>
            <oneOrMore>
              <ref name="author-element-id2614058"/>
            </oneOrMore>
            <empty/>
          </choice>
        </group>
        <choice>
          <oneOrMore>
            <ref name="character-element-id2613924"/>
          </oneOrMore>
          <empty/>
        </choice>
      </group>
      <ref name="foreign-nodes-id2614043"/>
    </interleave>
  </define>
  <define name="book-element-id2613963">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/library">book</name>
      <ref name="book-content-id2614016"/>
    </element>
  </define>
  <define name="born-element-id2613943">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/person">born</name>
      <data datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" type="date"/>
    </element>
  </define>
  <define name="character-element-id2613924">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/library">character</name>
      <group>
        <group>
          <group>
            <attribute>
              <name ns="">id</name>
              <text/>
            </attribute>
            <ref name="name-element-id2613832"/>
          </group>
          <ref name="born-element-id2613943"/>
        </group>
        <ref name="qualification-element-id2613840"/>
      </group>
    </element>
  </define>
  <define name="dead-element-id2613856">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/person">dead</name>
      <data datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" type="date"/>
    </element>
  </define>
  <define name="isbn-element-id2613872">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/library">isbn</name>
      <group>
        <ref name="foreign-attributes-id2614152"/>
        <data datatypeLibrary="" type="token"/>
      </group>
    </element>
  </define>
  <define name="name-element-id2613832">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/person">name</name>
      <data datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" type="token"/>
    </element>
  </define>
  <define name="qualification-element-id2613840">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/library">qualification</name>
      <text/>
    </element>
  </define>
  <define name="title-element-id2613819">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/library">title</name>
      <group>
        <ref name="foreign-attributes-id2614152"/>
        <text/>
      </group>
    </element>
  </define>
  <define name="available-content-id2613805">
    <choice>
      <choice>
        <value ns="http://eric.van-der-vlist.com/ns/library" type="token" datatypeLibrary="">true</value>
        <value ns="http://eric.van-der-vlist.com/ns/library" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" type="token"> false </value>
      </choice>
      <value ns="http://eric.van-der-vlist.com/ns/library" type="token" datatypeLibrary=""> </value>
    </choice>
  </define>
</grammar>
